package com.qj.sys;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cache.annotation.EnableCaching;
import org.springframework.context.annotation.ComponentScan;

/**
 * @author dlw
 * @date 2025-05-12 17:24
 */
@SpringBootApplication
@MapperScan(value = "com.qj.*.mapper")
@ComponentScan(value = "com.qj")
@EnableCaching
public class SysApplication {

    public static void main(String[] args) {
        //该代码用于将Log4j2的日志输出模式切换为‌全异步模式
        //通过设置系统属性Log4jContextSelector，强制所有Logger使用AsyncLoggerContextSelector，使日志事件通过‌无锁环形队列‌异步写入，避免阻塞业务线程
//        System.setProperty("Log4jContextSelector", "org.apache.logging.log4j.core.async.AsyncLoggerContextSelector");
        SpringApplication.run(SysApplication.class, args);
    }
}
